Installation notes
==================

  Specify cross compiler path with your cross tool chain path to build the 
kernel. During the module installation you can export INSTALL_MOD_PATH to 
the path where you want the kernel modules to be installed as 
'export INSTALL_MOD_PATH = <MODULE_PREFIX_PATH >'.


Test Environment
=================

Host:
     -Machine: IBM PC AT
     -OS: Fcore-3
Target:
     -Machine: RBTX4927
     -OS: Linux Development kit for mips


Build,Install and Test procedure
================================

   =================================================
   KERNEL :BUILD, INSTALL and TEST procedure
   =================================================

1. Download the linux-2.6.16.24.tgz from
   http://www.kernel.org/pub/linux/kernel/v2.6

2. Extract the linux-2.6.16.24.tar.gz as
   #tar -zxvf linux-2.6.16.24.tar.gz.

3. #cd linux-2.6.16.24


4. Create a directory called build-mips as
   #mkdir -p ../build-mips

5. Apply the patches present in PATCHES directory in the following order.
   - kprobes-mips-2.6.16.24-fixup.patch
   - kprobes-mips-2.6.16.24-1.patch
   - kprobes-kernel-test-module.patch

6. Prepare config file for TX49 board using menuconfig
   #make ARCH=mips CROSS_COMPILE=<cross-comipler-path> O=`pwd`/../build_mips menuconfig
 
7. In the Instrumentation Support
   Say 'y' to Kprobes (EXPERIMENTAL) 
   Say 'm' to Kprobes test modules (KPROBESTEST)

8. Build the kernel as
   #make ARCH=mips CROSS_COMPILE=<cross-comipler-path> O=`pwd`/../build_mips

9. Build the modules as
   #make ARCH=mips CROSS_COMPILE=<cross-comipler-path> O=`pwd`/../build_mips \
   modules

10.Export INSTALL_MOD_PATH= <MODULE_PREFIX_PATH> /* specify path if required */

11.Then install the modules as
   #make ARCH=mips CROSS_COMPILE=<cross-comipler-path> O=`pwd`/../build_mips \
   modules_install

   ===================================================
   USER PROGRAM :BUILD, INSTALL and TEST procedure
   ===================================================
1. #cd USER_TEST_PROGRAM

2. compile the user program with the MIPS cross compiler
   as <cross-compiler-gcc> <test program name.c> -o <test program name>
   E.g : gcc u-005.c -o u-005


3. Execute on the target Board


   =================================================
   EXECUTION ON THE TARGET BOARD
   =================================================

1. Boot the kernel on the target.

2. Copy the user program executables and the kernel modules of
   <MODULE_PREFIX_PATH>/lib/modules/<kernelrelease>/kernel/kprobe-tests/*.ko
   to the target board under the same folder.

3. On the target board execute the testprogram as given in
   mips_kprobes_test_procedure.txt
